package com.java.grammer;/*
Scanner 
用三元运算符求三个数中的最大值
if else 三个数中的最大值

*/


import java.util.Scanner;

public class ScannerTest_2 {
    public static void main(String[] args) {
/*		
		int a = 20 ;
		int b = 20;
		String c = (a==b)? "相等":"不相等";
		System.out.println(c);
		System.out.println("---------------------------------");

		int e = 50;
		int f = (a>=b)? a : b;
		int g = (f>e)? f : e;
		System.out.println(g);
		System.out.println("---------------------------------");


		if(a>b && a>e){
			System.out.println(a);
		}else if(b>a && b>e){
			System.out.println(b);
		}else if(e>a && e>b){
			System.out.println(e);
		}
*/
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入你的年龄");
        int a = sc.nextInt();
        System.out.println("请输入你的名字");
        String b = sc.next();
        System.out.println(a + b);
        System.out.println("请输入两个数");
        int c = sc.nextInt();
        int d = sc.nextInt();
        System.out.println(c + d);
        int e = (c > d) ? c : d;
        System.out.println(e);
        String f = (c == d) ? "相等" : "不相等";
        System.out.println(f);

    }
}
